<!DOCTYPE html>
<html lang="ch-CN">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="keywords" content="Hexo Theme Keep">
    <meta name="description" content="云舟上&#39;Blog">
    <meta name="author" content="云舟上">
    
    <title>
        
            powershell 学习笔记 | neovim 配置之路 |
        
        云舟上
    </title>
    
<link rel="stylesheet" href="/css/style.css">

    <link rel="shortcut icon" href="http://gofile.fuworldplus.work/image/1d877abc-60b3-4e02-b5e3-cf227ed8eba4.jpg">
    
<link rel="stylesheet" href="/css/font-awesome.min.css">

    <script id="hexo-configurations">
    let KEEP = window.KEEP || {};
    KEEP.hexo_config = {"hostname":"xxoo1xx.gitee.io","root":"/","language":"ch-CN","path":"search.json"};
    KEEP.theme_config = {"toc":{"enable":true,"number":false,"expand_all":false,"init_open":false},"style":{"primary_color":"#e2e1e4","avatar":"http://gofile.fuworldplus.work/image/1d877abc-60b3-4e02-b5e3-cf227ed8eba4.jpg","favicon":"http://gofile.fuworldplus.work/image/1d877abc-60b3-4e02-b5e3-cf227ed8eba4.jpg","article_img_align":"center","left_side_width":"260px","content_max_width":"920px","hover":{"shadow":false,"scale":false},"first_screen":{"enable":true,"background_img":null,"description":"人文与科技"},"scroll":{"progress_bar":{"enable":true},"percent":{"enable":false}}},"local_search":{"enable":true,"preload":false},"code_copy":{"enable":true,"style":"default"},"pjax":{"enable":false},"lazyload":{"enable":false},"version":"3.4.5"};
    KEEP.language_ago = {"second":"%s seconds ago","minute":"%s minutes ago","hour":"%s hours ago","day":"%s days ago","week":"%s weeks ago","month":"%s months ago","year":"%s years ago"};
  </script>
<meta name="generator" content="Hexo 6.1.0"></head>


<body>
<div class="progress-bar-container">
    
        <span class="scroll-progress-bar"></span>
    

    
</div>


<main class="page-container">

    

    <div class="page-main-content">

        <div class="page-main-content-top">
            <header class="header-wrapper">

    <div class="header-content">
        <div class="left">
            
                <a class="logo-image" href="/">
                    <img src="http://gofile.fuworldplus.work/image/1d877abc-60b3-4e02-b5e3-cf227ed8eba4.jpg">
                </a>
            
            <a class="logo-title" href="/">
                云舟上
            </a>
        </div>

        <div class="right">
            <div class="pc">
                <ul class="menu-list">
                    
                        <li class="menu-item">
                            <a class=""
                               href="/"
                            >
                                HOME
                            </a>
                        </li>
                    
                        <li class="menu-item">
                            <a class=""
                               href="/archives"
                            >
                                ARCHIVES
                            </a>
                        </li>
                    
                    
                        <li class="menu-item search search-popup-trigger">
                            <i class="fas fa-search"></i>
                        </li>
                    
                </ul>
            </div>
            <div class="mobile">
                
                    <div class="icon-item search search-popup-trigger"><i class="fas fa-search"></i></div>
                
                <div class="icon-item menu-bar">
                    <div class="menu-bar-middle"></div>
                </div>
            </div>
        </div>
    </div>

    <div class="header-drawer">
        <ul class="drawer-menu-list">
            
                <li class="drawer-menu-item flex-center">
                    <a class=""
                       href="/">HOME</a>
                </li>
            
                <li class="drawer-menu-item flex-center">
                    <a class=""
                       href="/archives">ARCHIVES</a>
                </li>
            
        </ul>
    </div>

    <div class="window-mask"></div>

</header>


        </div>

        <div class="page-main-content-middle">

            <div class="main-content">

                
                    <div class="fade-in-down-animation">
    <div class="article-content-container">

        <div class="article-title">
            <span class="title-hover-animation">powershell 学习笔记 | neovim 配置之路</span>
        </div>

        
            <div class="article-header">
                <div class="avatar">
                    <img src="http://gofile.fuworldplus.work/image/1d877abc-60b3-4e02-b5e3-cf227ed8eba4.jpg">
                </div>
                <div class="info">
                    <div class="author">
                        <span class="name">云舟上</span>
                        
                    </div>
                    <div class="meta-info">
                        <div class="article-meta-info">
    <span class="article-date article-meta-item">
        <i class="fas fa-edit"></i>&nbsp;
        <span class="pc">2022-10-01 17:20:01</span>
        <span class="mobile">2022-10-01 17:20</span>
    </span>
    
    
        <span class="article-tags article-meta-item">
            <i class="fas fa-tags"></i>&nbsp;
            <ul>
                
                    <li>
                        <a href="/tags/%E6%95%B0%E5%AD%97%E5%8C%96%E7%94%9F%E5%AD%98/">数字化生存</a>&nbsp;
                    </li>
                
            </ul>
        </span>
    

    
    
        <span class="article-wordcount article-meta-item">
            <i class="fas fa-file-word"></i>&nbsp;<span>1k Words</span>
        </span>
    
    
    
        <span class="article-pv article-meta-item">
            <i class="fas fa-eye"></i>&nbsp;<span id="busuanzi_value_page_pv"></span>
        </span>
    
</div>

                    </div>
                </div>
            </div>
        

        <div class="article-content markdown-body">
            <p>这两天又整了一些命令行工具，可能整得有些过多了，可能需要收敛一下，具体来说，需要一个一个消化，重点还是要回到对 ps 本身的学习上去。<br>前些日子，这个 blog 出现了一些问题，页面下面总是会显示几行代码，但上次又好了起来。我怀疑是代码生成的问题。今年年初学习 html 相关技术，现在很多可能已经荒废了，真是不应该。学习还是不能急，要保持“知之为知之，不知为不知”的态度。<br>昨天，在使用 scoop 的时候，又发现了一个问题，之前的配置没有纳入第三方软件库。总结出来的解决办法是：</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">scoop bucket add extras</span><br><span class="line"># 国内镜像</span><br><span class="line"># scoop bucket add extras https://gitee.com/scoop-bucket/extras.git</span><br><span class="line">scoop update</span><br></pre></td></tr></table></figure>
<p>回到今天的主题，neovim 的配置，这里面确实走了一些歪路，很多程度上，是因为我是在 windows 上使用它，而网上的很多教程是根据 linux 来整的。<br>第一个坑，可能是不要用 scoop 来安装这个软件，它的安装路径与配置，可能会与一般人使用的不同，网上找资料也会更困难。可以使用 winget 安装，这实际上与 exe 安装方法是一样的，但方便管理。<br>第二个坑是安装过程很可能不会自动生成配置文件路径，需要自己建立。<br>在系统盘用户用文件里“…\AppData\Local\”里可能可以见到“nvim-date”这个名字的文件夹，但我们需要的“nvim”需要自己建立。并在其中建立“init.lua”文件（我这里使用的是 lua 方式，其他方式没有试过）。<br>接下来，就可以（用nvim 或其他编辑器）打开“init.lua”文件，写入配置信息。<br>我没有使用插件，因为我觉得我可能不太需要使用 nvim 这个编辑器，我更可能使用的 vccode。至于其他的坑，我建议参考这个视频：<a class="link"   target="_blank" rel="noopener" href="https://www.bilibili.com/video/BV1CY411N7xf/?is_story_h5=false&p=1&share_from=ugc&share_medium=android&share_plat=android&share_session_id=8e4dfb75-415c-4fb2-832f-f43159392a63&share_source=WEIXIN&share_tag=s_i&timestamp=1664968172&unique_k=tfA6Ep0" >在Windows下配置NeoVim<i class="fas fa-external-link-alt"></i></a><br>我把我自己的配置信息列到下面，供参考:</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br></pre></td><td class="code"><pre><span class="line">-- utf8</span><br><span class="line">vim.g.encoding = &quot;UTF-8&quot;</span><br><span class="line">vim.o.fileencoding = &#x27;utf-8&#x27;</span><br><span class="line">-- jk移动时光标下上方保留8行</span><br><span class="line">vim.o.scrolloff = 8</span><br><span class="line">vim.o.sidescrolloff = 8</span><br><span class="line">-- 使用相对行号</span><br><span class="line">vim.wo.number = true</span><br><span class="line">vim.wo.relativenumber = true</span><br><span class="line">-- 高亮所在行</span><br><span class="line">vim.wo.cursorline = true</span><br><span class="line">-- 显示左侧图标指示列</span><br><span class="line">vim.wo.signcolumn = &quot;yes&quot;</span><br><span class="line">-- 右侧参考线，超过表示代码太长了，考虑换行</span><br><span class="line">vim.wo.colorcolumn = &quot;98&quot;</span><br><span class="line">-- 缩进2个空格等于一个Tab</span><br><span class="line">vim.o.tabstop = 2</span><br><span class="line">vim.bo.tabstop = 2</span><br><span class="line">vim.o.softtabstop = 2</span><br><span class="line">vim.o.shiftround = true</span><br><span class="line">-- &gt;&gt; &lt;&lt; 时移动长度</span><br><span class="line">vim.o.shiftwidth = 2</span><br><span class="line">vim.bo.shiftwidth = 2</span><br><span class="line">-- 新行对齐当前行，空格替代tab</span><br><span class="line">vim.o.expandtab = true</span><br><span class="line">vim.bo.expandtab = true</span><br><span class="line">vim.o.autoindent = true</span><br><span class="line">vim.bo.autoindent = true</span><br><span class="line">vim.o.smartindent = true</span><br><span class="line">-- 搜索大小写不敏感，除非包含大写</span><br><span class="line">vim.o.ignorecase = true</span><br><span class="line">vim.o.smartcase = true</span><br><span class="line">-- 搜索不要高亮</span><br><span class="line">vim.o.hlsearch = false</span><br><span class="line">-- 边输入边搜索</span><br><span class="line">vim.o.incsearch = true</span><br><span class="line">-- 使用增强状态栏后不再需要 vim 的模式提示</span><br><span class="line">vim.o.showmode = false</span><br><span class="line">-- 命令行高为2，提供足够的显示空间</span><br><span class="line">vim.o.cmdheight = 2</span><br><span class="line">-- 当文件被外部程序修改时，自动加载</span><br><span class="line">vim.o.autoread = true</span><br><span class="line">vim.bo.autoread =true</span><br><span class="line">-- 禁止折行</span><br><span class="line">vim.o.wrap = false</span><br><span class="line">vim.wo.wrap = false</span><br><span class="line">-- 行结尾可以跳到下一行</span><br><span class="line">vim.o.whichwrap = &#x27;b,s,&lt;,&gt;,[,],h,l&#x27;</span><br><span class="line">-- 允许隐藏被修改过的buffer</span><br><span class="line">vim.o.hidden = true</span><br><span class="line">-- 鼠标支持</span><br><span class="line">vim.o.mouse = &quot;a&quot;</span><br><span class="line">-- 禁止创建备份文件</span><br><span class="line">vim.o.backup = true</span><br><span class="line">vim.o.writebackup = true</span><br><span class="line">vim.o.swapfile = true</span><br><span class="line">-- smaller updatetime </span><br><span class="line">vim.o.updatetime = 300</span><br><span class="line">-- 等待mappings</span><br><span class="line">vim.o.timeoutlen = 100</span><br><span class="line">-- split window 从下边和右边出现</span><br><span class="line">vim.o.splitbelow = true</span><br><span class="line">vim.o.splitright = true</span><br><span class="line">-- 自动补全不自动选中</span><br><span class="line">vim.g.completeopt = &quot;menu,menuone,noselect,noinsert&quot;</span><br><span class="line">-- 样式</span><br><span class="line">vim.o.background = &quot;dark&quot;</span><br><span class="line">vim.o.termguicolors = true</span><br><span class="line">vim.opt.termguicolors = true</span><br><span class="line">-- 不可见字符的显示，这里只把空格显示为一个点</span><br><span class="line">vim.o.list = true</span><br><span class="line">vim.o.listchars = &quot;space:·&quot;</span><br><span class="line">-- 补全增强</span><br><span class="line">vim.o.wildmenu = true</span><br><span class="line">-- Dont&#x27; pass messages to |ins-completin menu|</span><br><span class="line">vim.o.shortmess = vim.o.shortmess .. &#x27;c&#x27;</span><br><span class="line">vim.o.pumheight = 10</span><br><span class="line">-- always show tabline</span><br><span class="line">vim.o.showtabline = 1</span><br></pre></td></tr></table></figure>
<p>同时，我还一定程度上参考了这个链接：<a class="link"   target="_blank" rel="noopener" href="https://zhuanlan.zhihu.com/p/434727338" >学习 Neovim 全配置， 逃离 VSCode<i class="fas fa-external-link-alt"></i></a></p>

        </div>

        

        
            <ul class="post-tags-box">
                
                    <li class="tag-item">
                        <a href="/tags/%E6%95%B0%E5%AD%97%E5%8C%96%E7%94%9F%E5%AD%98/">#数字化生存</a>&nbsp;
                    </li>
                
            </ul>
        

        
            <div class="article-nav">
                
                    <div class="article-prev">
                        <a class="prev"
                           rel="prev"
                           href="/2022/11/06/11-06/"
                        >
                            <span class="left arrow-icon flex-center">
                              <i class="fas fa-chevron-left"></i>
                            </span>
                            <span class="title flex-center">
                                <span class="post-nav-title-item">docker 的学习之路</span>
                                <span class="post-nav-item">Prev posts</span>
                            </span>
                        </a>
                    </div>
                
                
                    <div class="article-next">
                        <a class="next"
                           rel="next"
                           href="/2022/09/29/09-29/"
                        >
                            <span class="title flex-center">
                                <span class="post-nav-title-item">powershell 学习日记 | scoop 安装使用</span>
                                <span class="post-nav-item">Next posts</span>
                            </span>
                            <span class="right arrow-icon flex-center">
                              <i class="fas fa-chevron-right"></i>
                            </span>
                        </a>
                    </div>
                
            </div>
        

        
    </div>
</div>


                
            </div>

        </div>

        <div class="page-main-content-bottom">
            <footer class="footer">
    <div class="info-container">
        <div class="copyright-info info-item">
            &copy;
            
              <span>2022</span>
              -
            
            2024&nbsp;<i class="fas fa-heart icon-animate"></i>&nbsp;<a href="/">云舟上</a>
        </div>
        
            <script async  src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
            <div class="website-count info-item">
                
                    <span id="busuanzi_container_site_uv">
                        Visitor Count&nbsp;<span id="busuanzi_value_site_uv"></span>&ensp;
                    </span>
                
                
            </div>
        
        <div class="theme-info info-item">
            Powered by <a target="_blank" href="https://hexo.io">Hexo</a>&nbsp;|&nbsp;Theme&nbsp;<a class="theme-version" target="_blank" href="https://github.com/XPoet/hexo-theme-keep">Keep v3.4.5</a>
        </div>
        
        
    </div>
</footer>

        </div>
    </div>

    
        <div class="post-tools">
            <div class="post-tools-container">
    <ul class="tools-list">
        <!-- TOC aside toggle -->
        
            <li class="tools-item page-aside-toggle">
                <i class="fas fa-outdent"></i>
            </li>
        

        <!-- go comment -->
        
    </ul>
</div>

        </div>
    

    <div class="right-bottom-side-tools">
        <div class="side-tools-container">
    <ul class="side-tools-list">
        <li class="tools-item tool-font-adjust-plus flex-center">
            <i class="fas fa-search-plus"></i>
        </li>

        <li class="tools-item tool-font-adjust-minus flex-center">
            <i class="fas fa-search-minus"></i>
        </li>

        <li class="tools-item tool-expand-width flex-center">
            <i class="fas fa-arrows-alt-h"></i>
        </li>

        <li class="tools-item tool-dark-light-toggle flex-center">
            <i class="fas fa-moon"></i>
        </li>

        <!-- rss -->
        

        
            <li class="tools-item tool-scroll-to-top flex-center">
                <i class="fas fa-arrow-up"></i>
            </li>
        

        <li class="tools-item tool-scroll-to-bottom flex-center">
            <i class="fas fa-arrow-down"></i>
        </li>
    </ul>

    <ul class="exposed-tools-list">
        <li class="tools-item tool-toggle-show flex-center">
            <i class="fas fa-cog fa-spin"></i>
        </li>
        
    </ul>
</div>

    </div>

    
        <aside class="page-aside">
            <div class="post-toc-wrap">
    <div class="post-toc">
        
    </div>
</div>
        </aside>
    

    <div class="image-viewer-container">
    <img src="">
</div>


    
        <div class="search-pop-overlay">
    <div class="popup search-popup">
        <div class="search-header">
          <span class="search-input-field-pre">
            <i class="fas fa-keyboard"></i>
          </span>
            <div class="search-input-container">
                <input autocomplete="off"
                       autocorrect="off"
                       autocapitalize="off"
                       placeholder="Search..."
                       spellcheck="false"
                       type="search"
                       class="search-input"
                >
            </div>
            <span class="popup-btn-close">
                <i class="fas fa-times"></i>
            </span>
        </div>
        <div id="search-result">
            <div id="no-result">
                <i class="fas fa-spinner fa-pulse fa-5x fa-fw"></i>
            </div>
        </div>
    </div>
</div>

    

</main>




<script src="/js/utils.js"></script>

<script src="/js/main.js"></script>

<script src="/js/header-shrink.js"></script>

<script src="/js/back2top.js"></script>

<script src="/js/dark-light-toggle.js"></script>



    
<script src="/js/local-search.js"></script>




    
<script src="/js/code-copy.js"></script>





<div class="post-scripts">
    
        
<script src="/js/left-side-toggle.js"></script>

<script src="/js/libs/anime.min.js"></script>

<script src="/js/toc.js"></script>

    
</div>



</body>
</html>
